package com.tiancheng.trade.payment.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 优惠券清分明细表
 *
 * @author likailun
 * @date 2021-12-15 20:45
 */
@TableName(value = "coupon_settle_detail")
@Data
public class CouponSettleDetail implements Serializable {
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 清分id
     */
    private String settleId;

    /**
     * 中台商户编号
     */
    private String merchantCode;

    /**
     * 清分文件名
     */
    private String fileName;

    /**
     * 优惠券清分业务类型,0-平台管理费，1-转款补贴（出），2-转款补贴反交易（入）<br/>
     * @see com.tiancheng.trade.payment.enums.CouponSettleBusinessTypeEnum
     */
    private Integer businessType;

    /**
     * 子商户商户企业用户号
     */
    private String enterpriseCode;

    /**
     * 支付订单优惠金额
     */
    private Integer payCouponAmount;

    /**
     * 退款订单优惠金额
     */
    private Integer refundCouponAmount;

    /**
     * 最终结算优惠金额
     */
    private Integer settleCouponAmount;

    /**
     * 结算状态：ING=结算中；SUCCESS=结算成功；FAIL=结算失败
     */
    private String settleStatus;

    /**
     * 结算描述
     */
    private String settleRemarks;

    /**
     * 渠道结算编号
     */
    private String outSettleCode;

    /**
     * 转款补贴反交易关联——源清分id
     */
    private String sourceSettleId;


    /**
     * 转款补贴反交易关联——源清分id
     */
    private Integer sourceSettleAmount;

    /**
     * 剩余允许返还补贴反交易的金额
     */
    private Integer allowReturnAmount;

    /**
     * 手续费金额
     */
    private Integer serviceAmount;

    private LocalDateTime createTime;

    private LocalDateTime updateTime;

}